Resource URL: /platform/<<version=1>>/quota/quotas/<QID>/notifications

    Overview: This resource applies the standard collection pattern to quota
              notification rules.

     Methods: GET, PUT, POST, DELETE

********************************************************************************

Method GET: List all rules.

       URL: GET /platform/<<version=1>>/quota/quotas/<QID>/notifications

There are no query arguments for this method.

GET response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "notifications": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "properties": {
              "action_email_owner": {
                "required": true, 
                "type": "boolean", 
                "description": "Email quota domain owner when rule matches."
              }, 
              "email_template": {
                "required": true, 
                "type": [
                  "string", 
                  "null"
                ], 
                "description": "Path of optional /ifs template file used for email actions."
              }, 
              "schedule": {
                "required": true, 
                "type": [
                  "string", 
                  "null"
                ], 
                "description": "Schedule for rules that repeatedly notify."
              }, 
              "action_email_address": {
                "required": true, 
                "type": [
                  "string", 
                  "null"
                ], 
                "description": "Email a specific email address when rule matches."
              }, 
              "id": {
                "required": true, 
                "type": "string", 
                "description": "The system ID given to the rule."
              }, 
              "holdoff": {
                "required": true, 
                "type": [
                  "integer", 
                  "null"
                ], 
                "description": "Time to wait between detections for rules triggered by user actions."
              }, 
              "threshold": {
                "enum": [
                  "hard", 
                  "soft", 
                  "advisory"
                ], 
                "type": "string", 
                "description": "The quota threshold detected.", 
                "required": true
              }, 
              "action_alert": {
                "required": true, 
                "type": "boolean", 
                "description": "Send alert when rule matches."
              }, 
              "condition": {
                "enum": [
                  "exceeded", 
                  "denied", 
                  "violated", 
                  "expired"
                ], 
                "type": "string", 
                "description": "The condition detected.", 
                "required": true
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }, 
        "total": {
          "minimum": 0, 
          "type": "integer", 
          "description": "Total number of items available.", 
          "maximum": 4294967295
        }
      }
    }
  ]
}

********************************************************************************

Method PUT: This method creates an empty set of rules so that the global rules
            are not used. The input must be an empty JSON object.

       URL: PUT /platform/<<version=1>>/quota/quotas/<QID>/notifications

There are no query arguments for this method.

PUT request body schema:
{
  "type": [
    "null", 
    "object"
  ], 
  "description": "Null or any empty JSON object.", 
  "properties": {}
}

There is no JSON response body for this method.

********************************************************************************

Method POST: Create a new notification rule specific to this quota.

        URL: POST /platform/<<version=1>>/quota/quotas/<QID>/notifications

There are no query arguments for this method.

Required POST request body fields:
threshold, condition

POST request body schema:
{
  "type": "object", 
  "properties": {
    "action_email_owner": {
      "type": "boolean", 
      "description": "Email quota domain owner when rule matches."
    }, 
    "email_template": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Path of optional /ifs template file used for email actions."
    }, 
    "schedule": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Schedule for rules that repeatedly notify."
    }, 
    "action_email_address": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Email a specific email address when rule matches."
    }, 
    "holdoff": {
      "type": [
        "integer", 
        "null"
      ], 
      "description": "Time to wait between detections for rules triggered by user actions."
    }, 
    "threshold": {
      "enum": [
        "hard", 
        "soft", 
        "advisory"
      ], 
      "type": "string", 
      "description": "The quota threshold detected.", 
      "required": true
    }, 
    "action_alert": {
      "type": "boolean", 
      "description": "Send alert when rule matches."
    }, 
    "condition": {
      "enum": [
        "exceeded", 
        "denied", 
        "violated", 
        "expired"
      ], 
      "type": "string", 
      "description": "The condition detected.", 
      "required": true
    }
  }
}

POST response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "type": "object", 
      "properties": {
        "id": {
          "minLength": 0, 
          "required": true, 
          "type": "string", 
          "description": "ID of created item that can be used to refer to item in the collection-item resource path.", 
          "maxLength": 255
        }
      }
    }
  ]
}

********************************************************************************

Method DELETE: Delete all quota specific rules. The quota will then use the
               global rules.

          URL: DELETE /platform/<<version=1>>/quota/quotas/<QID>/notifications

There are no query arguments for this method.

There is no JSON response body for this method.
